<template>
<view class="getmes">
	<view class="box">
		<view class='header'>
			<image src='/static/logo.png'/>
		</view>

		<view class='content'>
			<view>为了更好的为您提供该服务</view>
			<text>我们需要获取您的部分信息(昵称，头像等)</text>
			<text>请在稍后的弹出框点击允许</text>
		</view>

		<button class='bottom' type='primary' open-type="getUserInfo" withCredentials="true" lang="zh_CN" @getuserinfo="getuserinfo">
			授权登录
		</button>
	</view>
</view>
</template>

<script>
export default {
	data() {
		return {
			cb: ''
		}
	},
	
	methods: {
		// 获取用户信息
		getuserinfo(e) {
			uni.redirectTo({ url: 'index?cb='+this.cb });
		}
	},
	onLoad(option) {
		this.cb=option.cb;
	}
}
</script>

<style>
.getmes {
	text-align: center;
	height: 100vh;
	position: relative;
	font-size: 30rpx;
	background: #fff;
}
.getmes .header {
	padding-top: 150rpx;
	padding-bottom: 50rpx;
	text-align: center;
	width: 100%;
	height: 300rpx;
}

.getmes .header image {
	width: 200rpx;
	height: 200rpx;
}

.getmes .content {
	text-align: center;
}

.getmes .content text {
	display: block;
	color: #9d9d9d;
	margin-top: 40rpx;
}

.getmes .bottom {
	border-radius: 80rpx;
	margin: 70rpx 50rpx;
	font-size: 35rpx;
}
</style>
